package com.yicong.ants.bean;

import com.cchao.simplelib.core.UiHelper;
import com.cchao.simplelib.util.StringHelper;
import com.yicong.ants.R;
import com.yicong.ants.utils.StringUtils;

import java.util.List;

/**
 * @author glj
 * @version 2021/3/12 0012
 */
public class HomePageBean {

    /**
     * id : 2
     * uid : 10425738
     * total_like : 0
     * total_fans : 1
     * total_focus : 0
     * total_coin : 43251.00
     * withdrawal_coin : 0.00
     * video_qty : 0
     * like_qty : 0
     * forwarding_qty : 0
     * created_at : 2021-03-05 15:29:04
     * updated_at : 2021-03-11 20:38:25
     * nickname : 用户stPe5w
     * avatar : http://ant.qiniu.yblylm.com/uploads/default_avatar.png
     * videos : [{"vid":"B0199D7EC32B8016E5D3F9C3745C4D58","uid":10425738,"face_img":"http://ant.qiniu.yblylm.com/videos/54b97dc9292eb7e87f3603df2430ab6e.mp4?vframe/jpg/offset/0","url":"http://ant.qiniu.yblylm.com/videos/54b97dc9292eb7e87f3603df2430ab6e.mp4","like_qty":3}]
     */

    private String id;
    private String uid;
    private String total_like = "0";
    private String total_fans = "0";
    private String total_focus = "0";
    private String total_coin = "0";
    private String withdrawal_coin = "0";
    private String video_qty = "0";
    private String like_qty = "0";
    private String forwarding_qty = "0";
    private String created_at;
    private String updated_at;
    private String nickname = UiHelper.getString(R.string.app_name);
    private String avatar = "http://ant.qiniu.yblylm.com/uploads/default_avatar.png";
    private List<VideosBean> videos;

    public HomePageBean() {
    }

    public String getNickNameString() {
        return "@" + StringHelper.null2Space(nickname);
    }

    public String getUidString() {
        return "蚁丛号 " + StringHelper.null2Space(uid);
    }

    public String getTotal_coinString() {
        return StringUtils.null2Int(total_coin) + "门票";
    }

    public String getId() {
        return this.id;
    }

    public String getUid() {
        return this.uid;
    }

    public String getTotal_like() {
        return this.total_like;
    }

    public String getTotal_fans() {
        return this.total_fans;
    }

    public String getTotal_focus() {
        return this.total_focus;
    }

    public String getTotal_coin() {
        return this.total_coin;
    }

    public String getWithdrawal_coin() {
        return this.withdrawal_coin;
    }

    public String getVideo_qty() {
        return this.video_qty;
    }

    public String getLike_qty() {
        return this.like_qty;
    }

    public String getForwarding_qty() {
        return this.forwarding_qty;
    }

    public String getCreated_at() {
        return this.created_at;
    }

    public String getUpdated_at() {
        return this.updated_at;
    }

    public String getNickname() {
        return this.nickname;
    }

    public String getAvatar() {
        return this.avatar;
    }

    public List<VideosBean> getVideos() {
        return this.videos;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public void setTotal_like(String total_like) {
        this.total_like = total_like;
    }

    public void setTotal_fans(String total_fans) {
        this.total_fans = total_fans;
    }

    public void setTotal_focus(String total_focus) {
        this.total_focus = total_focus;
    }

    public void setTotal_coin(String total_coin) {
        this.total_coin = total_coin;
    }

    public void setWithdrawal_coin(String withdrawal_coin) {
        this.withdrawal_coin = withdrawal_coin;
    }

    public void setVideo_qty(String video_qty) {
        this.video_qty = video_qty;
    }

    public void setLike_qty(String like_qty) {
        this.like_qty = like_qty;
    }

    public void setForwarding_qty(String forwarding_qty) {
        this.forwarding_qty = forwarding_qty;
    }

    public void setCreated_at(String created_at) {
        this.created_at = created_at;
    }

    public void setUpdated_at(String updated_at) {
        this.updated_at = updated_at;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public void setVideos(List<VideosBean> videos) {
        this.videos = videos;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof HomePageBean)) return false;
        final HomePageBean other = (HomePageBean) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        if (this$id == null ? other$id != null : !this$id.equals(other$id)) return false;
        final Object this$uid = this.getUid();
        final Object other$uid = other.getUid();
        if (this$uid == null ? other$uid != null : !this$uid.equals(other$uid)) return false;
        final Object this$total_like = this.getTotal_like();
        final Object other$total_like = other.getTotal_like();
        if (this$total_like == null ? other$total_like != null : !this$total_like.equals(other$total_like))
            return false;
        final Object this$total_fans = this.getTotal_fans();
        final Object other$total_fans = other.getTotal_fans();
        if (this$total_fans == null ? other$total_fans != null : !this$total_fans.equals(other$total_fans))
            return false;
        final Object this$total_focus = this.getTotal_focus();
        final Object other$total_focus = other.getTotal_focus();
        if (this$total_focus == null ? other$total_focus != null : !this$total_focus.equals(other$total_focus))
            return false;
        final Object this$total_coin = this.getTotal_coin();
        final Object other$total_coin = other.getTotal_coin();
        if (this$total_coin == null ? other$total_coin != null : !this$total_coin.equals(other$total_coin))
            return false;
        final Object this$withdrawal_coin = this.getWithdrawal_coin();
        final Object other$withdrawal_coin = other.getWithdrawal_coin();
        if (this$withdrawal_coin == null ? other$withdrawal_coin != null : !this$withdrawal_coin.equals(other$withdrawal_coin))
            return false;
        final Object this$video_qty = this.getVideo_qty();
        final Object other$video_qty = other.getVideo_qty();
        if (this$video_qty == null ? other$video_qty != null : !this$video_qty.equals(other$video_qty))
            return false;
        final Object this$like_qty = this.getLike_qty();
        final Object other$like_qty = other.getLike_qty();
        if (this$like_qty == null ? other$like_qty != null : !this$like_qty.equals(other$like_qty))
            return false;
        final Object this$forwarding_qty = this.getForwarding_qty();
        final Object other$forwarding_qty = other.getForwarding_qty();
        if (this$forwarding_qty == null ? other$forwarding_qty != null : !this$forwarding_qty.equals(other$forwarding_qty))
            return false;
        final Object this$created_at = this.getCreated_at();
        final Object other$created_at = other.getCreated_at();
        if (this$created_at == null ? other$created_at != null : !this$created_at.equals(other$created_at))
            return false;
        final Object this$updated_at = this.getUpdated_at();
        final Object other$updated_at = other.getUpdated_at();
        if (this$updated_at == null ? other$updated_at != null : !this$updated_at.equals(other$updated_at))
            return false;
        final Object this$nickname = this.getNickname();
        final Object other$nickname = other.getNickname();
        if (this$nickname == null ? other$nickname != null : !this$nickname.equals(other$nickname))
            return false;
        final Object this$avatar = this.getAvatar();
        final Object other$avatar = other.getAvatar();
        if (this$avatar == null ? other$avatar != null : !this$avatar.equals(other$avatar))
            return false;
        final Object this$videos = this.getVideos();
        final Object other$videos = other.getVideos();
        if (this$videos == null ? other$videos != null : !this$videos.equals(other$videos))
            return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof HomePageBean;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $id = this.getId();
        result = result * PRIME + ($id == null ? 43 : $id.hashCode());
        final Object $uid = this.getUid();
        result = result * PRIME + ($uid == null ? 43 : $uid.hashCode());
        final Object $total_like = this.getTotal_like();
        result = result * PRIME + ($total_like == null ? 43 : $total_like.hashCode());
        final Object $total_fans = this.getTotal_fans();
        result = result * PRIME + ($total_fans == null ? 43 : $total_fans.hashCode());
        final Object $total_focus = this.getTotal_focus();
        result = result * PRIME + ($total_focus == null ? 43 : $total_focus.hashCode());
        final Object $total_coin = this.getTotal_coin();
        result = result * PRIME + ($total_coin == null ? 43 : $total_coin.hashCode());
        final Object $withdrawal_coin = this.getWithdrawal_coin();
        result = result * PRIME + ($withdrawal_coin == null ? 43 : $withdrawal_coin.hashCode());
        final Object $video_qty = this.getVideo_qty();
        result = result * PRIME + ($video_qty == null ? 43 : $video_qty.hashCode());
        final Object $like_qty = this.getLike_qty();
        result = result * PRIME + ($like_qty == null ? 43 : $like_qty.hashCode());
        final Object $forwarding_qty = this.getForwarding_qty();
        result = result * PRIME + ($forwarding_qty == null ? 43 : $forwarding_qty.hashCode());
        final Object $created_at = this.getCreated_at();
        result = result * PRIME + ($created_at == null ? 43 : $created_at.hashCode());
        final Object $updated_at = this.getUpdated_at();
        result = result * PRIME + ($updated_at == null ? 43 : $updated_at.hashCode());
        final Object $nickname = this.getNickname();
        result = result * PRIME + ($nickname == null ? 43 : $nickname.hashCode());
        final Object $avatar = this.getAvatar();
        result = result * PRIME + ($avatar == null ? 43 : $avatar.hashCode());
        final Object $videos = this.getVideos();
        result = result * PRIME + ($videos == null ? 43 : $videos.hashCode());
        return result;
    }

    public String toString() {
        return "HomePageBean(id=" + this.getId() + ", uid=" + this.getUid() + ", total_like=" + this.getTotal_like() + ", total_fans=" + this.getTotal_fans() + ", total_focus=" + this.getTotal_focus() + ", total_coin=" + this.getTotal_coin() + ", withdrawal_coin=" + this.getWithdrawal_coin() + ", video_qty=" + this.getVideo_qty() + ", like_qty=" + this.getLike_qty() + ", forwarding_qty=" + this.getForwarding_qty() + ", created_at=" + this.getCreated_at() + ", updated_at=" + this.getUpdated_at() + ", nickname=" + this.getNickname() + ", avatar=" + this.getAvatar() + ", videos=" + this.getVideos() + ")";
    }

    public static class VideosBean {
        /**
         * vid : B0199D7EC32B8016E5D3F9C3745C4D58
         * uid : 10425738
         * face_img : http://ant.qiniu.yblylm.com/videos/54b97dc9292eb7e87f3603df2430ab6e.mp4?vframe/jpg/offset/0
         * url : http://ant.qiniu.yblylm.com/videos/54b97dc9292eb7e87f3603df2430ab6e.mp4
         * like_qty : 3
         */

        private String vid;
        private Integer uid;
        private String face_img;
        private String url;
        private Integer like_qty;

        public VideosBean() {
        }

        public String getVid() {
            return this.vid;
        }

        public Integer getUid() {
            return this.uid;
        }

        public String getFace_img() {
            return this.face_img;
        }

        public String getUrl() {
            return this.url;
        }

        public Integer getLike_qty() {
            return this.like_qty;
        }

        public void setVid(String vid) {
            this.vid = vid;
        }

        public void setUid(Integer uid) {
            this.uid = uid;
        }

        public void setFace_img(String face_img) {
            this.face_img = face_img;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        public void setLike_qty(Integer like_qty) {
            this.like_qty = like_qty;
        }

        public boolean equals(final Object o) {
            if (o == this) return true;
            if (!(o instanceof VideosBean)) return false;
            final VideosBean other = (VideosBean) o;
            if (!other.canEqual((Object) this)) return false;
            final Object this$vid = this.getVid();
            final Object other$vid = other.getVid();
            if (this$vid == null ? other$vid != null : !this$vid.equals(other$vid)) return false;
            final Object this$uid = this.getUid();
            final Object other$uid = other.getUid();
            if (this$uid == null ? other$uid != null : !this$uid.equals(other$uid)) return false;
            final Object this$face_img = this.getFace_img();
            final Object other$face_img = other.getFace_img();
            if (this$face_img == null ? other$face_img != null : !this$face_img.equals(other$face_img))
                return false;
            final Object this$url = this.getUrl();
            final Object other$url = other.getUrl();
            if (this$url == null ? other$url != null : !this$url.equals(other$url)) return false;
            final Object this$like_qty = this.getLike_qty();
            final Object other$like_qty = other.getLike_qty();
            if (this$like_qty == null ? other$like_qty != null : !this$like_qty.equals(other$like_qty))
                return false;
            return true;
        }

        protected boolean canEqual(final Object other) {
            return other instanceof VideosBean;
        }

        public int hashCode() {
            final int PRIME = 59;
            int result = 1;
            final Object $vid = this.getVid();
            result = result * PRIME + ($vid == null ? 43 : $vid.hashCode());
            final Object $uid = this.getUid();
            result = result * PRIME + ($uid == null ? 43 : $uid.hashCode());
            final Object $face_img = this.getFace_img();
            result = result * PRIME + ($face_img == null ? 43 : $face_img.hashCode());
            final Object $url = this.getUrl();
            result = result * PRIME + ($url == null ? 43 : $url.hashCode());
            final Object $like_qty = this.getLike_qty();
            result = result * PRIME + ($like_qty == null ? 43 : $like_qty.hashCode());
            return result;
        }

        public String toString() {
            return "HomePageBean.VideosBean(vid=" + this.getVid() + ", uid=" + this.getUid() + ", face_img=" + this.getFace_img() + ", url=" + this.getUrl() + ", like_qty=" + this.getLike_qty() + ")";
        }
    }
}
